From 90ad72ce3ecf32b8b3051e1f22fa26cd3726a232 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 12 Jan 2012 13:54:28 +0100 Subject: [PATCH] amd iommu: Enable FC bit in iommu host level PTE Signed-off-by: Wei Wang Committed-by: Jan Beulich --- xen/drivers/passthrough/amd/iommu_map.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 772f30fe89..43bf5e53a2 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -83,6 +83,13 @@ static bool_t set_iommu_pde_present(u32 *pde, unsigned long next_mfn, set_field_in_reg_u32(ir, entry, IOMMU_PDE_IO_READ_PERMISSION_MASK, IOMMU_PDE_IO_READ_PERMISSION_SHIFT, &entry); + + /* FC bit should be enabled in PTE, this helps to solve potential + * issues with ATS devices + */ + if ( next_level == IOMMU_PAGING_MODE_LEVEL_0 ) + set_field_in_reg_u32(IOMMU_CONTROL_ENABLED, entry, + IOMMU_PTE_FC_MASK, IOMMU_PTE_FC_SHIFT, &entry); pde[1] = entry; /* mark next level as 'present' */ -- 2.30.2